<?php

class Bootstrap extends YouNet_Bootstrap
{
    protected function _initAutoload()
    {
        Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH.'/modules/Core/controllers/helpers/', 'Core_Controller_Helper_');
    }

    public function __initPath()
    {
		parent::__initPath();
        // Define path to image directory
		define('IMG_PATH', STATIC_PATH . '/img');

		// Define path to image directory
		define('UPLOAD_PATH', STATIC_PATH . '/upload');
        define('UPLOAD_URL', STATIC_URL . '/upload');
		
		$bitlyConfig = $this->getOption('bitly');
		if( $bitlyConfig )
		{
			define('BITLY_HOST', $bitlyConfig['host']);
			define('BITLY_USERNAME', $bitlyConfig['username']);
			define('BITLY_API_KEY', $bitlyConfig['apiKey']);
		}
    }
	
	public function __initPaymentManager()
	{
		parent::__initPaymentManager();

		$manager = Payment_Manager::getInstance();
		$manager->setOptions($this->getOptions());
		$manager->registerHandler(new Payment_Item_Trial());
		$manager->registerHandler(new Payment_Item_Campaign());
		$manager->registerHandler(new Payment_Item_Footer());
	}
}
